<template>
    <div class="cmp-container">
        <div class="page-title">应用使用统计</div>
        <chart xField="dataMonth" class="chart" ref="chartRef" />
    </div>
</template>
<script setup>
import Chart from "@/components/chart/index.vue";
import { onMounted } from "vue";

const chartRef = ref();
const yfields = ref([]);

onMounted(() => {
    app.https.get("/sys/stat/month/app").then((resp) => {
        chartRef.value.reload(resp, { type: "line", label: { show: true, position: "top" }, prop: "count" });
    });
});
</script>

<style lang="scss" scoped>
.chart {
    box-sizing: border-box;
    height: calc(100% - 40px) !important;
}

.cmp-container {
    height: 100%;
}
</style>
